function [ predictions, confidence, time, confusionMatrix, onlineError ] = TestClassificationFunction(classifier, kernel_handle, TrainingData, TestData, classToSegment)
    tic;
    switch lower(classifier)
        case 'exponentiated'
            [predictions, confidence, onlineError] = SegmentClassExpGradient(TrainingData, TestData, classToSegment, false, false);
            time = toc;
        case 'bayesian'
            [predictions, confidence, onlineError] = BayesLinearRegression(TrainingData, TestData, classToSegment, false);
            time = toc;
        case 'gaussian'
            [predictions,confidence] = gpr_wo_noise(kernel_handle,TrainingData,TestData,classToSegment);
            onlineError = 0;
            time = toc;
        otherwise
            display('Please enter either exponentiated or bayesian or gaussian');
    end
    
    confusionMatrix = cross_validation(TestData, predictions, classToSegment);
end

